<!--
/**
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="pragma" content="no-cache" />
    <title>cookieTrack</title>
</head>
<body>
    <span>cookieTrack</span>
</body>
</html>
<script type="text/javascript">
 function createRandomTag(tagName,src) {
            let tagEle = document.createElement(tagName);

            // 设置script标签的src属性
            tagEle.src = src+'?'+Math.random();

                // 将script标签添加到HTML文档中
            document.head.appendChild(tagEle);
    }
     function createDiv(tagName,content){
            let tagEle = document.createElement('div');

            // 设置script标签的src属性
            tagEle.innerText = content;

                // 将script标签添加到HTML文档中
            document.body.appendChild(tagEle);
    }
    let src_list = ['https://mc.yandex.ru/metrika/watch.js','https://mc.yandex.ru/metrika/tag.js'];
    for(let src of src_list){

        createRandomTag('script',src);
        createDiv('div',src);
    }
    let img_list = ['https://hm.baidu.com/hm.gif'];
    for(let src of img_list) {
        createRandomTag('img',src);
        createDiv('div',src);
    }

    function printCookie() {
     createDiv('div',document.cookie);
    }
</script>
